package ph.mallody.lalamove.common;

import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;

/**
 * 创建HttpClient对象的工具类
 */
public class HttpClientCreater {

    private static final PoolingHttpClientConnectionManager cm = new PoolingHttpClientConnectionManager();

    public static CloseableHttpClient create() {
        CloseableHttpClient httpClient = HttpClients.custom().setConnectionManager(cm).build();
        return httpClient;
    }

}
